package com.module.lemlin.util

import android.app.Activity
import com.tencent.mm.opensdk.modelmsg.SendAuth

/**
 * 微信授权登录
 * */
fun wxAuthorize() {
    if (!isWXAppInstalled)
        return
    val req = SendAuth.Req()
    req.scope = "snsapi_userinfo"
    req.state = "wechat_sdk_bind"
    iwxapi.sendReq(req)
}

/**
 * QQ授权登录
 * */
fun qqAuthorize(activity: Activity) {
    if (!isQQAppInstalled)
        return
    iqqapi.login(activity, "all", iUiListener)
}